package com.icross.albazon.sidemenu;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.UnsupportedEncodingException;
import java.net.HttpURLConnection;
import java.net.SocketException;
import java.net.SocketTimeoutException;
import java.net.URL;
import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.List;

import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
import org.apache.http.client.HttpClient;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.cookie.Cookie;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.params.HttpConnectionParams;
import org.apache.http.params.HttpParams;
import org.apache.http.util.EntityUtils;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.Color;
import android.graphics.Typeface;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.os.AsyncTask;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.preference.PreferenceManager;
import android.util.DisplayMetrics;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.View.OnTouchListener;
import android.view.ViewGroup;
import android.view.Window;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.view.animation.TranslateAnimation;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout.LayoutParams;
import android.widget.TextView;
import android.widget.Toast;

import com.icross.albazon.Board_ListActivity;
import com.icross.albazon.CompanyService_1AdminActivity;
import com.icross.albazon.CompanyService_2ManagementActivity;
import com.icross.albazon.CompanyService_3InfoActivity;
import com.icross.albazon.CompanyService_5HumanActivity;
import com.icross.albazon.MainActivity;
import com.icross.albazon.Person_1SupportActivity;
import com.icross.albazon.Person_2RecordActivity;
import com.icross.albazon.Person_3InfoActivity;
import com.icross.albazon.R;
import com.icross.albazon.json.JsonData;
import com.icross.albazon.member.MemberJoin_01;
import com.icross.albazon.message.MessageList_Company;
import com.icross.albazon.message.MessageList_Person;
import com.icross.albazon.object.Const;
import com.icross.albazon.object.DTOMainProduct;
import com.icross.albazon.product.Product_Information;
import com.icross.albazon.recruit.RecruitActivityJobKind;
import com.icross.albazon.recruit.RecruitActivityLocation;
import com.icross.albazon.recruit.RecruitActivityMap;
import com.icross.albazon.recruit.RecruitActivityMrs;
import com.icross.albazon.recruit.RecruitActivityNearStation;
import com.icross.albazon.recruit.RecruitActivityNowLocation;
import com.icross.albazon.recruit.RecruitActivityOld;
import com.icross.albazon.recruit.RecruitActivityUniversity;
import com.icross.albazon.utility.UtilPreference;

@SuppressLint({ "ClickableViewAccessibility", "CutPasteId" })
public class BaseActivity extends Activity {
	private Context mContext;

	String login_id, login_pw;

	private ViewGroup mContentView = null;

	private LinearLayout mTitleLayout = null;

	private LinearLayout mAlphaLayout = null;

	private TextView mTitleTextView = null;

	private Button mBackButton = null;
	private Button mHomeButton = null;

	private Button mLeftButton = null;
	private Button mRightButton = null;

	private CheckBox chk_login_status;
	// 자유게시판
	private String jsondata1, jsondata2, jsondata3;
	private String cnt;
	/* slide menu */
	private DisplayMetrics metrics;
	private LinearLayout slidingPanel;
	private LinearLayout leftMenuPanel;
	private LinearLayout leftMenuPanelSub;
	private LinearLayout leftMenuPanelEmpty;

	private LinearLayout rightMenuPanel;
	private LinearLayout rightMenuPanelSub;
	private LinearLayout rightMenuPanelEmpty;

	private FrameLayout.LayoutParams slidingPanelParameters;
	private int leftPanelWidth, rightPanelWidth;
	private static boolean isLeftExpanded;
	public static boolean isRightExpanded;

	int mCurrentX = 0;

	private List<Cookie> cookies;
	private String result;
	private Dialog sectionPopupMenuDialog;
	private UtilPreference uPref;

	private JsonData jsondata;

	public static HttpClient client = new DefaultHttpClient();

	@Override
	protected void onCreate(Bundle savedInstanceState) {

		requestWindowFeature(Window.FEATURE_NO_TITLE);

		super.onCreate(savedInstanceState);
		super.setContentView(R.layout.base_activity);

		mContext = this;
		uPref = new UtilPreference(mContext);

		mContentView = (ViewGroup) findViewById(R.id.content_view);

		mAlphaLayout = (LinearLayout) findViewById(R.id.alpha);
		// mTitleLayout = ( LinearLayout ) findViewById( R.id.title_view );
		//
		// mBackButton = ( Button ) findViewById( R.id.back_button );
		// mHomeButton = ( Button ) findViewById( R.id.home_button );
		// mTitleTextView = ( TextView ) findViewById( R.id.title_textview );

		metrics = new DisplayMetrics();
		getWindowManager().getDefaultDisplay().getMetrics(metrics);
		leftPanelWidth = (int) ((metrics.widthPixels) * 0.75);
		rightPanelWidth = (int) ((metrics.widthPixels) * 0.75);

		// sliding view Initialize
		slidingPanel = (LinearLayout) findViewById(R.id.slidingPanel);
		slidingPanelParameters = (FrameLayout.LayoutParams) slidingPanel
				.getLayoutParams();
		slidingPanelParameters.width = metrics.widthPixels;
		slidingPanel.setLayoutParams(slidingPanelParameters);

		// left slide menu initialize
		leftMenuPanel = (LinearLayout) findViewById(R.id.leftMenuPanel);
		leftMenuPanelSub = (LinearLayout) findViewById(R.id.leftMenuPanel_sub);

		leftMenuPanelSub.setOnTouchListener(new OnTouchListener() {

			private float mDx;

			@Override
			public boolean onTouch(View v, MotionEvent event) {

				int action = event.getAction();
				if (action == MotionEvent.ACTION_DOWN) {
					mDx = mCurrentX - event.getRawX();
				} else if (action == MotionEvent.ACTION_MOVE) {
					mCurrentX = (int) (event.getRawX() + mDx);

					if (mCurrentX <= 0) {

						leftMenuPanel.setX(mCurrentX);

					} else if (mCurrentX > 0) {
						leftMenuPanel.setX(0);
					}

				} else if (action == MotionEvent.ACTION_UP) {

					if (leftMenuPanel.getX() > -leftPanelWidth / 2) {

						isLeftExpanded = false;
						menuLeftSlideAnimationToggle(leftMenuPanel.getX()
								/ metrics.widthPixels);
						leftMenuPanel.setX(0);
						mCurrentX = 0;

					} else {

						isLeftExpanded = true;
						menuLeftSlideAnimationToggle(leftMenuPanel.getX()
								/ metrics.widthPixels);
						leftMenuPanel.setX(0);
						mCurrentX = 0;
					}

				}

				return true;
			}
		});

		leftMenuPanelEmpty = (LinearLayout) findViewById(R.id.leftMenuPanel_empty);

		// right slide menu initialize
		rightMenuPanel = (LinearLayout) findViewById(R.id.rightMenuPanel);
		rightMenuPanelSub = (LinearLayout) findViewById(R.id.rightMenuPanel_sub);
		rightMenuPanelSub.setOnTouchListener(new OnTouchListener() {

			private float mDx;

			@Override
			public boolean onTouch(View v, MotionEvent event) {

				int action = event.getAction();
				if (action == MotionEvent.ACTION_DOWN) {
					mDx = mCurrentX - event.getRawX();
				} else if (action == MotionEvent.ACTION_MOVE) {
					mCurrentX = (int) (event.getRawX() + mDx);

					if (mCurrentX < 0) {

						rightMenuPanel.setX(0);

					} else if (mCurrentX >= 0) {
						rightMenuPanel.setX(mCurrentX);
					}

				} else if (action == MotionEvent.ACTION_UP) {

					if (rightMenuPanel.getX() > rightPanelWidth / 2) {

						Log.e("", "111" + rightMenuPanel.getX()
								/ metrics.widthPixels);

						isRightExpanded = true;
						menuRightSlideAnimationToggle(rightMenuPanel.getX()
								/ metrics.widthPixels);
						rightMenuPanel.setX(0);
						mCurrentX = 0;

					} else {

						Log.e("", "222" + rightMenuPanel.getX());

						isRightExpanded = false;
						menuRightSlideAnimationToggle(rightMenuPanel.getX()
								/ metrics.widthPixels);
						rightMenuPanel.setX(0);
						mCurrentX = 0;

					}

				}

				return true;
			}
		});
		rightMenuPanelEmpty = (LinearLayout) findViewById(R.id.rightMenuPanel_empty);

	}

	public void setLeftPanelSize(float weight) {

		metrics = new DisplayMetrics();
		getWindowManager().getDefaultDisplay().getMetrics(metrics);
		leftPanelWidth = (int) ((metrics.widthPixels) * weight);

		LinearLayout.LayoutParams positionSub = new LinearLayout.LayoutParams(
				0, android.view.ViewGroup.LayoutParams.FILL_PARENT, weight);
		leftMenuPanelSub.setLayoutParams(positionSub);

		LinearLayout.LayoutParams positionEmpty = new LinearLayout.LayoutParams(
				0, android.view.ViewGroup.LayoutParams.FILL_PARENT, 1 - weight);
		leftMenuPanelEmpty.setLayoutParams(positionEmpty);

	}

	public void setRightPanelSize(float weight) {

		metrics = new DisplayMetrics();
		getWindowManager().getDefaultDisplay().getMetrics(metrics);

		rightPanelWidth = (int) ((metrics.widthPixels) * weight);

		LinearLayout.LayoutParams positionSub = new LinearLayout.LayoutParams(
				0, android.view.ViewGroup.LayoutParams.FILL_PARENT, weight); // 맨
																				// 마지막
																				// 부분의
																				// 숫자가
																				// 가중치
																				// 입니다.
		rightMenuPanelSub.setLayoutParams(positionSub);

		LinearLayout.LayoutParams positionEmpty = new LinearLayout.LayoutParams(
				0, android.view.ViewGroup.LayoutParams.FILL_PARENT, 1 - weight); // 맨
																					// 마지막
																					// 부분의
																					// 숫자가
																					// 가중치
																					// 입니다.
		rightMenuPanelEmpty.setLayoutParams(positionEmpty);

	}

	public void setLeftSlidingButton(Button button) {

		mLeftButton = button;

		UtilPreference uPref1 = new UtilPreference(mContext);

		String loginType, loginName, loginNum;
		loginType = uPref1.getValue("login_type", null);
		loginName = uPref1.getValue("login_name", null);
		loginNum = uPref1.getValue("login_num", null);

		Log.e(Const.LOGCAT, "btn click loginType : " + loginType
				+ " , loginNum : " + loginNum);

		if ((loginType.equals("3") && loginNum.equals("2"))
				|| (loginType.equals("3") && loginNum.equals("1"))) { // 기업로그인
			Button bt_info = (Button) findViewById(R.id.bt_info);
			Button bt_join = (Button) findViewById(R.id.bt_join);
			Button bt_Curriculum = (Button) findViewById(R.id.bt_Curriculum);
			Button bt_Profile = (Button) findViewById(R.id.bt_login);
			Button bt_companyenrollment = (Button) findViewById(R.id.bt_companyenrollment);
			Button bt_companyenrollment2 = (Button) findViewById(R.id.bt_companyenrollment2);
			Button bt_companyinfo = (Button) findViewById(R.id.bt_companyinfo);
			Button bt_logout = (Button) findViewById(R.id.bt_logout);
			Button bt_logout2 = (Button) findViewById(R.id.bt_logout2);
			LinearLayout alone_visble = (LinearLayout) findViewById(R.id.alone_visble);
			LinearLayout company_visble = (LinearLayout) findViewById(R.id.company_visble);
			alone_visble.setVisibility(View.GONE);
			bt_Curriculum.setVisibility(View.GONE);
			bt_Profile.setVisibility(View.GONE);
			bt_join.setVisibility(View.GONE);
			bt_info.setVisibility(View.GONE);

			bt_companyinfo.setVisibility(View.VISIBLE);
			bt_companyenrollment.setVisibility(View.GONE);// *1*
			bt_companyenrollment2.setVisibility(View.VISIBLE);
			bt_logout.setVisibility(View.GONE); // *2*
			bt_logout2.setVisibility(View.VISIBLE);
			company_visble.setVisibility(View.VISIBLE);
		} else if ((loginType.equals("4") && loginNum.equals("2"))
				|| (loginType.equals("4") && loginNum.equals("1"))) { // 개인로그인
			Button bt_support = (Button) findViewById(R.id.bt_support);
			Button bt_info = (Button) findViewById(R.id.bt_info);
			Button bt_logout = (Button) findViewById(R.id.bt_logout);
			Button bt_logout2 = (Button) findViewById(R.id.bt_logout2);
			Button bt_login = (Button) findViewById(R.id.bt_login);
			Button bt_join = (Button) findViewById(R.id.bt_join);
			Button bt_companyinfo = (Button) findViewById(R.id.bt_companyinfo);
			Button bt_companyenrollment = (Button) findViewById(R.id.bt_companyenrollment);
			Button bt_companyenrollment2 = (Button) findViewById(R.id.bt_companyenrollment2);

			LinearLayout linear_message = (LinearLayout) findViewById(R.id.linear_message);
			linear_message.setVisibility(View.VISIBLE);

			bt_logout.setVisibility(View.VISIBLE);
			bt_logout2.setVisibility(View.GONE); // *2*
			bt_support.setVisibility(View.VISIBLE);
			bt_info.setVisibility(View.VISIBLE);
			bt_companyinfo.setVisibility(View.GONE);
			bt_companyenrollment.setVisibility(View.GONE);
			bt_companyenrollment2.setVisibility(View.GONE);
			bt_login.setVisibility(View.GONE);
			bt_join.setVisibility(View.GONE);
		} else {
			Button bt_login = (Button) findViewById(R.id.bt_login);
			Button bt_join = (Button) findViewById(R.id.bt_join);
			Button bt_companyenrollment = (Button) findViewById(R.id.bt_companyenrollment);
			Button bt_companyenrollment2 = (Button) findViewById(R.id.bt_companyenrollment2);
			Button bt_logout = (Button) findViewById(R.id.bt_logout);
			Button bt_logout2 = (Button) findViewById(R.id.bt_logout2);
			Button bt_support = (Button) findViewById(R.id.bt_support);
			Button bt_info = (Button) findViewById(R.id.bt_info);
			Button bt_topmenu = (Button) findViewById(R.id.bt_topmenu);
			Button bt_topmenu1 = (Button) findViewById(R.id.bt_topmenu1);
			Button bt_topmenu2 = (Button) findViewById(R.id.bt_topmenu2);
			Button bt_careers = (Button) findViewById(R.id.bt_careers);
			Button bt_Curriculum = (Button) findViewById(R.id.bt_Curriculum);
			Button bt_companyinfo = (Button) findViewById(R.id.bt_companyinfo);
			LinearLayout alone_visble = (LinearLayout) findViewById(R.id.alone_visble);
			LinearLayout company_visble = (LinearLayout) findViewById(R.id.company_visble);
			alone_visble.setVisibility(View.VISIBLE);
			company_visble.setVisibility(View.GONE);

			bt_logout.setVisibility(View.GONE);
			bt_logout2.setVisibility(View.GONE);
			bt_support.setVisibility(View.GONE);
			bt_info.setVisibility(View.GONE);
			bt_companyinfo.setVisibility(View.GONE);
			bt_login.setVisibility(View.VISIBLE);
			bt_join.setVisibility(View.VISIBLE);
			bt_Curriculum.setVisibility(View.VISIBLE);
			bt_companyenrollment.setVisibility(View.VISIBLE); // *1*
			bt_companyenrollment2.setVisibility(View.GONE);
		}
		/*
		 * 개인용
		 */
		Button bt_support = (Button) findViewById(R.id.bt_support); // 지원현황
		Button bt_info = (Button) findViewById(R.id.bt_info); // 개인정보

		/*
		 * 사업용
		 */
		Button bt_companyenrollment = (Button) findViewById(R.id.bt_companyenrollment); // 공고등록
		Button bt_companyenrollment2 = (Button) findViewById(R.id.bt_companyenrollment2); // 공고등록
		Button bt_companyinfo = (Button) findViewById(R.id.bt_companyinfo); // 기업정보
		Button bt_logout = (Button) findViewById(R.id.bt_logout); // 로그아웃
		Button bt_logout2 = (Button) findViewById(R.id.bt_logout2); // 로그아웃2

		Button bt_management = (Button) findViewById(R.id.bt_management); // 공고관리
		Button bt_showing = (Button) findViewById(R.id.bt_showing); // 게재중
		Button bt_showend = (Button) findViewById(R.id.bt_showend); // 게재종료
		Button bt_showpost = (Button) findViewById(R.id.bt_showpost); // 게재대기
		Button bt_hold = (Button) findViewById(R.id.bt_hold); // 결제보류
		Button bt_volunteer = (Button) findViewById(R.id.bt_volunteer); // 지원자관리
		Button bt_allvolunteer = (Button) findViewById(R.id.bt_allvolunteer); // 전체지원자
		Button bt_announcement_allvolunteer = (Button) findViewById(R.id.bt_announcement_allvolunteer); // 공고별
																										// 지원자
		Button bt_resumes = (Button) findViewById(R.id.bt_resumes); // 이력서열람
		Button bt_scrap = (Button) findViewById(R.id.bt_scrap); // 인재스크랩
		Button bt_message = (Button) findViewById(R.id.bt_message); // 쪽지함
		Button bt_message01 = (Button) findViewById(R.id.bt_message01); // 쪽지함

		/*
		 * 로그아웃상태용
		 */
		Button bt_Curriculum = (Button) findViewById(R.id.bt_Curriculum);
		Button bt_login = (Button) findViewById(R.id.bt_login);
		Button bt_join = (Button) findViewById(R.id.bt_join);
		Button bt_topmenu = (Button) findViewById(R.id.bt_topmenu);
		Button bt_topmenu1 = (Button) findViewById(R.id.bt_topmenu1);
		Button bt_topmenu2 = (Button) findViewById(R.id.bt_topmenu2);
		@SuppressWarnings("unused")
		Button bt_careers = (Button) findViewById(R.id.bt_careers);

		/*
		 * 로그인 상태용
		 */

		/*
		 * 지역별
		 */
		Button bt_area = (Button) findViewById(R.id.bt_area);
		Button bt_area1 = (Button) findViewById(R.id.bt_area1); // 서울
		Button bt_area2 = (Button) findViewById(R.id.bt_area2); // 부산
		Button bt_area3 = (Button) findViewById(R.id.bt_area3); // 경기
		Button bt_area4 = (Button) findViewById(R.id.bt_area4); // 인천
		Button bt_area5 = (Button) findViewById(R.id.bt_area5); // 대전
		Button bt_area_add = (Button) findViewById(R.id.bt_area_add); // 더보기
		Button bt_area6 = (Button) findViewById(R.id.bt_area6); // 대구 //gone
		Button bt_area7 = (Button) findViewById(R.id.bt_area7); // 광주 //gone
		Button bt_area8 = (Button) findViewById(R.id.bt_area8); // 울산 //gone
		Button bt_area9 = (Button) findViewById(R.id.bt_area9); // 세종 //gone
		Button bt_area10 = (Button) findViewById(R.id.bt_area10); // 강원 //gone
		Button bt_area11 = (Button) findViewById(R.id.bt_area11); // 경남 //gone
		Button bt_area12 = (Button) findViewById(R.id.bt_area12); // 경북 //gone
		Button bt_area13 = (Button) findViewById(R.id.bt_area13); // 충남 //gone
		Button bt_area14 = (Button) findViewById(R.id.bt_area14); // 충북 //gone
		Button bt_area15 = (Button) findViewById(R.id.bt_area15); // 전남 //gone
		Button bt_area16 = (Button) findViewById(R.id.bt_area16); // 전북 //gone
		Button bt_area17 = (Button) findViewById(R.id.bt_area17); // 제주 //gone
		Button bt_area18 = (Button) findViewById(R.id.bt_area18); // 전국 //gone
		Button bt_area19 = (Button) findViewById(R.id.bt_area19); // 해외 //gone
		Button bt_area20 = (Button) findViewById(R.id.bt_area20); // 현위치 //gone
		Button bt_area_Close = (Button) findViewById(R.id.bt_area_Close); // 닫기
		/*
		 * 직종별
		 */
		Button bt_profession = (Button) findViewById(R.id.bt_profession);
		Button bt_profession1 = (Button) findViewById(R.id.bt_profession1); // 매장/판매
		Button bt_profession2 = (Button) findViewById(R.id.bt_profession2); // 음식점
		Button bt_profession3 = (Button) findViewById(R.id.bt_profession3); // 뷰티/케어
		Button bt_profession4 = (Button) findViewById(R.id.bt_profession4); // 생산/기술
		Button bt_profession5 = (Button) findViewById(R.id.bt_profession5); // 사무/관리
		Button bt_profession_add = (Button) findViewById(R.id.bt_profession_add); // 더보기
		Button bt_profession6 = (Button) findViewById(R.id.bt_profession6); // 운전/배송
		Button bt_profession7 = (Button) findViewById(R.id.bt_profession7); // TM/영업
		Button bt_profession8 = (Button) findViewById(R.id.bt_profession8); // 강사/교육
		Button bt_profession9 = (Button) findViewById(R.id.bt_profession9); // 간호/의료
		Button bt_profession10 = (Button) findViewById(R.id.bt_profession10); // 건설/노무
		Button bt_profession11 = (Button) findViewById(R.id.bt_profession11); // IT/디자인
		Button bt_profession12 = (Button) findViewById(R.id.bt_profession12); // 공백
		Button bt_profession_Close = (Button) findViewById(R.id.bt_profession_Close); // 닫기
		/*
		 * 기타분류
		 */
		Button bt_other = (Button) findViewById(R.id.bt_other);
		Button bt_other1 = (Button) findViewById(R.id.bt_other1); // 대학가
		Button bt_other2 = (Button) findViewById(R.id.bt_other2); // 역세권
		Button bt_other3 = (Button) findViewById(R.id.bt_other3); // 지도로 찾기
		Button bt_other4 = (Button) findViewById(R.id.bt_other4); // 중장년 채용관
		Button bt_other5 = (Button) findViewById(R.id.bt_other5); // 주부추천
		Button bt_other_add = (Button) findViewById(R.id.bt_other_add); // 더보기
		Button bt_other6 = (Button) findViewById(R.id.bt_other6); // 창원공단경력직

		Button bt_other7 = (Button) findViewById(R.id.bt_other7); // Visible.GONE
		Button bt_other8 = (Button) findViewById(R.id.bt_other8); // Visible.GONE
		Button bt_other9 = (Button) findViewById(R.id.bt_other9); // Visible.GONE
		Button bt_other10 = (Button) findViewById(R.id.bt_other10); // Visible.GONE
		Button bt_other11 = (Button) findViewById(R.id.bt_other11); // Visible.GONE
		Button bt_other12 = (Button) findViewById(R.id.bt_other12); // Visible.GONE
		Button bt_other13 = (Button) findViewById(R.id.bt_other13); // Visible.GONE
		Button bt_other14 = (Button) findViewById(R.id.bt_other14); // Visible.GONE
		Button bt_other15 = (Button) findViewById(R.id.bt_other15); // Visible.GONE
		Button bt_other16 = (Button) findViewById(R.id.bt_other16); // Visible.GONE
		Button bt_other17 = (Button) findViewById(R.id.bt_other17); // Visible.GONE
		Button bt_other18 = (Button) findViewById(R.id.bt_other18); // Visible.GONE
		Button bt_orher_Close = (Button) findViewById(R.id.bt_orher_Close); // 닫기

		Button bt_freeboard = (Button) findViewById(R.id.bt_freeboard); // 자유게시판
		Button bt_product = (Button) findViewById(R.id.bt_product); // 상품안내

		/***********************
		 * 
		 * 
		 * 
		 ***********************/

		// 지원현황
		bt_support.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				menuLeftSlideAnimationToggle(0);
				Intent Person_Intent1 = new Intent(mContext,
						Person_1SupportActivity.class);
				Person_Intent1.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
				mContext.startActivity(Person_Intent1);
			}
		});
		// 개인정보
		bt_info.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				menuLeftSlideAnimationToggle(0);
				Intent Person_Intent3 = new Intent(mContext,
						Person_3InfoActivity.class);
				Person_Intent3.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
				mContext.startActivity(Person_Intent3);
			}
		});
		// 이력서
		bt_Curriculum.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				String loginType, loginNum;
				loginType = uPref.getValue("login_type", null); // 기업,개인로그인확인
				loginNum = uPref.getValue("login_num", null); // 로그인유지 유무확인
				menuLeftSlideAnimationToggle(0);
				if (loginType.equals("4") && loginNum.equals("1")
						|| loginType.equals("4") && loginNum.equals("2")) {

					Intent Person_Intent2 = new Intent(mContext,
							Person_2RecordActivity.class);
					Person_Intent2.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
					mContext.startActivity(Person_Intent2);

					Toast.makeText(mContext, "개인서비스 허용", Toast.LENGTH_SHORT)
							.show();

				} else if (loginType.equals("3") && loginNum.equals("1")
						|| loginType.equals("3") && loginNum.equals("2")) {
					Toast.makeText(mContext, "기업회원은 개인서비스를 이용할 수 없습니다. ",
							Toast.LENGTH_SHORT).show();
				} else {
					Toast.makeText(mContext, "개인회원으로 로그인후 이용하실 수 있습니다. ",
							Toast.LENGTH_SHORT).show();
				}
			}
		});
		// 회원가입
		bt_join.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				menuLeftSlideAnimationToggle(0);

				Handler mHandler = new Handler(Looper.getMainLooper());
				mHandler.postDelayed(new Runnable() {
					@Override
					public void run() {
						Intent mIntent = new Intent(mContext,
								MemberJoin_01.class);
						mIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
						mContext.startActivity(mIntent);
					}
				}, 1000);
			}
		});
		// 탑메뉴 버튼1
		bt_topmenu1.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
			}
		});
		// 탑메뉴 버튼2
		bt_topmenu2.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
			}
		});
		// 지역별
		bt_area.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				menuLeftSlideAnimationToggle(0);

				Handler mHandler = new Handler(Looper.getMainLooper());
				mHandler.postDelayed(new Runnable() {
					@Override
					public void run() {
						DTOMainProduct.setmChkMode("normal");
						Intent mIntent = new Intent(mContext,
								RecruitActivityLocation.class);
						mIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
						mContext.startActivity(mIntent);
					}
				}, 1000);
			}
		});
		// 서울
		bt_area1.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				DTOMainProduct.setmChkMode("search");
				DTOMainProduct.setmIndex("0000");
				menuLeftSlideAnimationToggle(0);
				Intent mIntent = new Intent(mContext,
						RecruitActivityLocation.class);
				mIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
				mContext.startActivity(mIntent);
			}
		});
		// 인천
		bt_area4.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				DTOMainProduct.setmChkMode("search");
				DTOMainProduct.setmIndex("0001");
				menuLeftSlideAnimationToggle(0);
				Intent mIntent = new Intent(mContext,
						RecruitActivityLocation.class);
				mIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
				mContext.startActivity(mIntent);
			}
		});
		// 대전
		bt_area5.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				DTOMainProduct.setmChkMode("search");
				DTOMainProduct.setmIndex("0002");
				menuLeftSlideAnimationToggle(0);
				Intent mIntent = new Intent(mContext,
						RecruitActivityLocation.class);
				mIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
				mContext.startActivity(mIntent);
			}
		});
		// 광주
		bt_area7.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				DTOMainProduct.setmChkMode("search");
				DTOMainProduct.setmIndex("0003");
				menuLeftSlideAnimationToggle(0);
				Intent mIntent = new Intent(mContext,
						RecruitActivityLocation.class);
				mIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
				mContext.startActivity(mIntent);
			}
		});
		// 대구
		bt_area6.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				DTOMainProduct.setmChkMode("search");
				DTOMainProduct.setmIndex("0004");
				menuLeftSlideAnimationToggle(0);
				Intent mIntent = new Intent(mContext,
						RecruitActivityLocation.class);
				mIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
				mContext.startActivity(mIntent);
			}
		});
		// 울산
		bt_area8.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				DTOMainProduct.setmChkMode("search");
				DTOMainProduct.setmIndex("0005");
				menuLeftSlideAnimationToggle(0);
				Intent mIntent = new Intent(mContext,
						RecruitActivityLocation.class);
				mIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
				mContext.startActivity(mIntent);
			}
		});
		// 부산
		bt_area2.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				DTOMainProduct.setmChkMode("search");
				DTOMainProduct.setmIndex("0006");
				menuLeftSlideAnimationToggle(0);
				Intent mIntent = new Intent(mContext,
						RecruitActivityLocation.class);
				mIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
				mContext.startActivity(mIntent);
			}
		});
		// 경기
		bt_area3.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				DTOMainProduct.setmChkMode("search");
				DTOMainProduct.setmIndex("0007");
				menuLeftSlideAnimationToggle(0);
				Intent mIntent = new Intent(mContext,
						RecruitActivityLocation.class);
				mIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
				mContext.startActivity(mIntent);
			}
		});
		// 강원
		bt_area10.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				DTOMainProduct.setmChkMode("search");
				DTOMainProduct.setmIndex("0008");
				menuLeftSlideAnimationToggle(0);
				Intent mIntent = new Intent(mContext,
						RecruitActivityLocation.class);
				mIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
				mContext.startActivity(mIntent);
			}
		});
		// 충북
		bt_area14.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				DTOMainProduct.setmChkMode("search");
				DTOMainProduct.setmIndex("0009");
				menuLeftSlideAnimationToggle(0);
				Intent mIntent = new Intent(mContext,
						RecruitActivityLocation.class);
				mIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
				mContext.startActivity(mIntent);
			}
		});
		// 충남
		bt_area13.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				DTOMainProduct.setmChkMode("search");
				DTOMainProduct.setmIndex("0010");
				menuLeftSlideAnimationToggle(0);
				Intent mIntent = new Intent(mContext,
						RecruitActivityLocation.class);
				mIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
				mContext.startActivity(mIntent);
			}
		});
		// 전북
		bt_area16.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				DTOMainProduct.setmChkMode("search");
				DTOMainProduct.setmIndex("0011");
				menuLeftSlideAnimationToggle(0);
				Intent mIntent = new Intent(mContext,
						RecruitActivityLocation.class);
				mIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
				mContext.startActivity(mIntent);
			}
		});
		// 전남
		bt_area15.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				DTOMainProduct.setmChkMode("search");
				DTOMainProduct.setmIndex("0012");
				menuLeftSlideAnimationToggle(0);
				Intent mIntent = new Intent(mContext,
						RecruitActivityLocation.class);
				mIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
				mContext.startActivity(mIntent);
			}
		});
		// 경북
		bt_area12.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				DTOMainProduct.setmChkMode("search");
				DTOMainProduct.setmIndex("0013");
				menuLeftSlideAnimationToggle(0);
				Intent mIntent = new Intent(mContext,
						RecruitActivityLocation.class);
				mIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
				mContext.startActivity(mIntent);
			}
		});
		// 경남
		bt_area11.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				DTOMainProduct.setmChkMode("search");
				DTOMainProduct.setmIndex("0014");
				menuLeftSlideAnimationToggle(0);
				Intent mIntent = new Intent(mContext,
						RecruitActivityLocation.class);
				mIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
				mContext.startActivity(mIntent);
			}
		});
		// 제주
		bt_area17.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				DTOMainProduct.setmChkMode("search");
				DTOMainProduct.setmIndex("0015");
				menuLeftSlideAnimationToggle(0);
				Intent mIntent = new Intent(mContext,
						RecruitActivityLocation.class);
				mIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
				mContext.startActivity(mIntent);
			}
		});
		// 세종
		bt_area9.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				DTOMainProduct.setmChkMode("search");
				DTOMainProduct.setmIndex("0016");
				menuLeftSlideAnimationToggle(0);
				Intent mIntent = new Intent(mContext,
						RecruitActivityLocation.class);
				mIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
				mContext.startActivity(mIntent);
			}
		});
		// 전국
		bt_area18.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				DTOMainProduct.setmChkMode("normal");
				menuLeftSlideAnimationToggle(0);
				Intent mIntent = new Intent(mContext,
						RecruitActivityLocation.class);
				mIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
				mContext.startActivity(mIntent);
			}
		});
		// 해외
		bt_area19.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				DTOMainProduct.setmChkMode("normal");
				menuLeftSlideAnimationToggle(0);
				Intent mIntent = new Intent(mContext,
						RecruitActivityLocation.class);
				mIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
				mContext.startActivity(mIntent);
			}
		});
		// 현위치
		bt_area20.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				DTOMainProduct.setmChkMode("normal");
				menuLeftSlideAnimationToggle(0);
				Intent mIntent = new Intent(mContext,
						RecruitActivityNowLocation.class);
				mIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
				mContext.startActivity(mIntent);
			}
		});
		// 더보기
		bt_area_add.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Button bt_area_add = (Button) findViewById(R.id.bt_area_add);
				Button bt_area6 = (Button) findViewById(R.id.bt_area6); // 대구
				LinearLayout area_visble = (LinearLayout) findViewById(R.id.area_visble);
				bt_area_add.setVisibility(View.GONE);
				bt_area6.setVisibility(View.VISIBLE);
				area_visble.setVisibility(View.VISIBLE);
			}
		});
		// 닫기버튼
		bt_area_Close.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Button bt_area_add = (Button) findViewById(R.id.bt_area_add);
				Button bt_area6 = (Button) findViewById(R.id.bt_area6); // 대구
				LinearLayout area_visble = (LinearLayout) findViewById(R.id.area_visble);
				bt_area_add.setVisibility(View.VISIBLE);
				bt_area6.setVisibility(View.GONE);
				area_visble.setVisibility(View.GONE);
			}
		});
		bt_logout.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				menuLeftSlideAnimationToggle(0);

				AlertDialog.Builder builder = new AlertDialog.Builder(mContext);
				builder.setTitle("로그아웃 하시겠습니까?");
				builder.setIcon(R.drawable.icon_warring);
				builder.setMessage("로그아웃 하시겠습니까?");
				builder.setPositiveButton("확인",
						new DialogInterface.OnClickListener() {
							public void onClick(DialogInterface dialog,
									int whichButton) {
								dialog.dismiss();

								PostLogoutTask();

							}
						});
				AlertDialog alert = builder.create();
				alert.show();

			}
		});

		bt_logout2.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				menuLeftSlideAnimationToggle(0);

				AlertDialog.Builder builder = new AlertDialog.Builder(mContext);
				builder.setTitle("로그아웃 하시겠습니까?");
				builder.setIcon(R.drawable.icon_warring);
				builder.setMessage("로그아웃 하시겠습니까?");
				builder.setPositiveButton("확인",
						new DialogInterface.OnClickListener() {
							public void onClick(DialogInterface dialog,
									int whichButton) {
								dialog.dismiss();

								PostLogoutTask();
								Intent mainIntent = new Intent(mContext,
										MainActivity.class);
								mainIntent
										.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
								Toast.makeText(mContext, "로그아웃 성공", 2000)
										.show();
								mContext.startActivity(mainIntent);

							}
						});
				AlertDialog alert = builder.create();
				alert.show();

			}
		});

		// 개인정보
		bt_login.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				menuLeftSlideAnimationToggle(0);

				LinearLayout linear = (LinearLayout) View.inflate(mContext,
						R.layout.dialog_login, null);
				ImageView img_login_dialog_cancel = (ImageView) linear
						.findViewById(R.id.img_login_dialog_cancel);
				final EditText edt_login_dialog_id = (EditText) linear
						.findViewById(R.id.edt_login_dialog_id);
				final EditText edt_login_dialog_pw = (EditText) linear
						.findViewById(R.id.edt_login_dialog_pw);
				Button btn_login_dialog_ok = (Button) linear
						.findViewById(R.id.btn_login_dialog_ok);
				TextView txv_find_id_pw = (TextView) linear
						.findViewById(R.id.txv_find_id_pw);
				TextView txv_albazon_join = (TextView) linear
						.findViewById(R.id.txv_albazon_join);
				chk_login_status = (CheckBox) linear
						.findViewById(R.id.chk_login_status);

				sectionPopupMenuDialog = new Dialog(mContext);
				sectionPopupMenuDialog.setCancelable(false);
				sectionPopupMenuDialog
						.requestWindowFeature(Window.FEATURE_NO_TITLE);
				sectionPopupMenuDialog.getWindow().setBackgroundDrawable(
						new ColorDrawable(Color.TRANSPARENT));
				sectionPopupMenuDialog.setContentView(linear);
				sectionPopupMenuDialog.show();

				// AlertDialog.Builder builder = new
				// AlertDialog.Builder(mContext);
				// builder.setView(linear);
				// final AlertDialog alert = builder.create();
				// alert.show();

				img_login_dialog_cancel
						.setOnClickListener(new OnClickListener() {
							public void onClick(View arg0) {
								sectionPopupMenuDialog.dismiss();
							}
						});

				btn_login_dialog_ok.setOnClickListener(new OnClickListener() {
					public void onClick(View arg0) {
						if (edt_login_dialog_id.getText().toString().length() > 0) {
							if (edt_login_dialog_pw.getText().toString()
									.length() > 0) {
								login_id = edt_login_dialog_id.getText()
										.toString();
								login_pw = edt_login_dialog_pw.getText()
										.toString();
								PostLoginTask(login_id, login_pw);
							} else {
								Toast.makeText(mContext, "비밀번호를 입력하세요.",
										Toast.LENGTH_SHORT).show();
							}
						} else {
							Toast.makeText(mContext, "아이디를 입력하세요.",
									Toast.LENGTH_SHORT).show();
						}
					}
				});

				txv_find_id_pw.setOnClickListener(new OnClickListener() {
					public void onClick(View arg0) {
						Toast.makeText(mContext, "아이디/비밀번호 찾기 웹뷰 URL 열기",
								Toast.LENGTH_SHORT).show();
					}
				});

				txv_albazon_join.setOnClickListener(new OnClickListener() {
					public void onClick(View arg0) {
						sectionPopupMenuDialog.dismiss();
						Intent mIntent = new Intent(mContext,
								MemberJoin_01.class);
						mIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
						mContext.startActivity(mIntent);
					}
				});
			}
		});
		// 탑메뉴 버튼
		bt_topmenu.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub

				PostLoginInfoTask();
			}
		});
		// 직종별
		bt_profession.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				menuLeftSlideAnimationToggle(0);

				Handler mHandler = new Handler(Looper.getMainLooper());
				mHandler.postDelayed(new Runnable() {
					@Override
					public void run() {
						DTOMainProduct.setmChkMode("normal");
						Intent mIntent = new Intent(mContext,
								RecruitActivityJobKind.class);
						mIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
						mContext.startActivity(mIntent);
					}
				}, 1000);
			}
		});
		// 매장/판매
		bt_profession1.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				menuLeftSlideAnimationToggle(0);
				Intent mIntent = new Intent(mContext,
						RecruitActivityJobKind.class);
				mIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
				mContext.startActivity(mIntent);
			}
		});
		// 음식점
		bt_profession2.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				menuLeftSlideAnimationToggle(0);
				Intent mIntent = new Intent(mContext,
						RecruitActivityJobKind.class);
				mIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
				mContext.startActivity(mIntent);
			}
		});
		// 뷰티/케어
		bt_profession3.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				menuLeftSlideAnimationToggle(0);
				Intent mIntent = new Intent(mContext,
						RecruitActivityJobKind.class);
				mIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
				mContext.startActivity(mIntent);
			}
		});
		// 생산/기술
		bt_profession4.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				menuLeftSlideAnimationToggle(0);
				Intent mIntent = new Intent(mContext,
						RecruitActivityJobKind.class);
				mIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
				mContext.startActivity(mIntent);
			}
		});
		// 사무/관리
		bt_profession5.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				menuLeftSlideAnimationToggle(0);
				Intent mIntent = new Intent(mContext,
						RecruitActivityJobKind.class);
				mIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
				mContext.startActivity(mIntent);
			}
		});
		// 운전/배송
		bt_profession6.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				menuLeftSlideAnimationToggle(0);
				Intent mIntent = new Intent(mContext,
						RecruitActivityJobKind.class);
				mIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
				mContext.startActivity(mIntent);
			}
		});
		// TM/영업
		bt_profession7.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				menuLeftSlideAnimationToggle(0);
				Intent mIntent = new Intent(mContext,
						RecruitActivityJobKind.class);
				mIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
				mContext.startActivity(mIntent);
			}
		});
		// 강사/교육
		bt_profession8.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				menuLeftSlideAnimationToggle(0);
				Intent mIntent = new Intent(mContext,
						RecruitActivityJobKind.class);
				mIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
				mContext.startActivity(mIntent);
			}
		});
		// 간호/의료
		bt_profession9.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				menuLeftSlideAnimationToggle(0);
				Intent mIntent = new Intent(mContext,
						RecruitActivityJobKind.class);
				mIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
				mContext.startActivity(mIntent);
			}
		});
		// 건설/노무
		bt_profession10.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				menuLeftSlideAnimationToggle(0);
				Intent mIntent = new Intent(mContext,
						RecruitActivityJobKind.class);
				mIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
				mContext.startActivity(mIntent);
			}
		});
		// IT/디자인
		bt_profession11.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				menuLeftSlideAnimationToggle(0);
				Intent mIntent = new Intent(mContext,
						RecruitActivityJobKind.class);
				mIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
				mContext.startActivity(mIntent);
			}
		});
		// 공백
		bt_profession12.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				menuLeftSlideAnimationToggle(0);
				Intent mIntent = new Intent(mContext,
						RecruitActivityJobKind.class);
				mIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
				mContext.startActivity(mIntent);
			}
		});
		// 더보기
		bt_profession_add.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Button bt_profession_add = (Button) findViewById(R.id.bt_profession_add);
				Button bt_profession6 = (Button) findViewById(R.id.bt_profession6); // 대구
				LinearLayout profession_visble = (LinearLayout) findViewById(R.id.profession_visble);
				bt_profession_add.setVisibility(View.GONE);
				bt_profession6.setVisibility(View.VISIBLE);
				profession_visble.setVisibility(View.VISIBLE);
			}
		});
		// 닫기버튼
		bt_profession_Close.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Button bt_profession_add = (Button) findViewById(R.id.bt_profession_add);
				Button bt_profession6 = (Button) findViewById(R.id.bt_profession6); // 대구
				LinearLayout profession_visble = (LinearLayout) findViewById(R.id.profession_visble);
				bt_profession_add.setVisibility(View.VISIBLE);
				bt_profession6.setVisibility(View.GONE);
				profession_visble.setVisibility(View.GONE);
			}
		});
		// 기타분류
		bt_other.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
			}
		});
		// 대학가
		bt_other1.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				menuLeftSlideAnimationToggle(0);

				Handler mHandler = new Handler(Looper.getMainLooper());
				mHandler.postDelayed(new Runnable() {
					@Override
					public void run() {
						DTOMainProduct.setmChkMode("normal");
						Intent mIntent = new Intent(mContext,
								RecruitActivityUniversity.class);
						mIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
						mContext.startActivity(mIntent);
					}
				}, 1000);
			}
		});
		// 역세권
		bt_other2.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				menuLeftSlideAnimationToggle(0);

				Handler mHandler = new Handler(Looper.getMainLooper());
				mHandler.postDelayed(new Runnable() {
					@Override
					public void run() {
						DTOMainProduct.setmChkMode("normal");
						Intent mIntent = new Intent(mContext,
								RecruitActivityNearStation.class);
						mIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
						mContext.startActivity(mIntent);
					}
				}, 1000);
			}
		});
		// 지도로 찾기
		bt_other3.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				menuLeftSlideAnimationToggle(0);

				Handler mHandler = new Handler(Looper.getMainLooper());
				mHandler.postDelayed(new Runnable() {
					@Override
					public void run() {
						DTOMainProduct.setmChkMode("normal");
						Intent mIntent = new Intent(mContext,
								RecruitActivityMap.class);
						mIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
						mContext.startActivity(mIntent);
					}
				}, 1000);
			}
		});
		// 창원공단 경력직
		bt_other4.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				menuLeftSlideAnimationToggle(0);

				Handler mHandler = new Handler(Looper.getMainLooper());
				mHandler.postDelayed(new Runnable() {
					@Override
					public void run() {
						DTOMainProduct.setmChkMode("normal");
						Intent mIntent = new Intent(mContext,
								RecruitActivityOld.class);
						mIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
						mContext.startActivity(mIntent);
					}
				}, 1000);
			}
		});
		// 주부 추천
		bt_other5.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				menuLeftSlideAnimationToggle(0);

				Handler mHandler = new Handler(Looper.getMainLooper());
				mHandler.postDelayed(new Runnable() {
					@Override
					public void run() {
						DTOMainProduct.setmChkMode("normal");
						Intent mIntent = new Intent(mContext,
								RecruitActivityMrs.class);
						mIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
						mContext.startActivity(mIntent);
					}
				}, 1000);
			}
		});
		// 더보기
		bt_other_add.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Button bt_other_add = (Button) findViewById(R.id.bt_other_add);
				Button bt_other6 = (Button) findViewById(R.id.bt_other6); // 대구
				LinearLayout other_visble = (LinearLayout) findViewById(R.id.other_visble);
				bt_other_add.setVisibility(View.GONE);
				bt_other6.setVisibility(View.VISIBLE);
				other_visble.setVisibility(View.VISIBLE);
			}
		});
		// 중장년 채용관
		bt_other6.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				menuLeftSlideAnimationToggle(0);

				Handler mHandler = new Handler(Looper.getMainLooper());
				mHandler.postDelayed(new Runnable() {
					@Override
					public void run() {
						DTOMainProduct.setmChkMode("normal");
						Intent mIntent = new Intent(mContext,
								RecruitActivityOld.class);
						mIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
						mContext.startActivity(mIntent);
					}
				}, 1000);
			}
		});

		// Visible.GONE
		bt_other7.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
			}
		});
		// Visible.GONE
		bt_other8.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
			}
		});
		// Visible.GONE
		bt_other9.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
			}
		});
		// Visible.GONE
		bt_other10.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
			}
		});
		// Visible.GONE
		bt_other11.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
			}
		});
		// Visible.GONE
		bt_other12.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
			}
		});
		// Visible.GONE
		bt_other13.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
			}
		});
		// Visible.GONE
		bt_other14.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
			}
		});
		// Visible.GONE
		bt_other15.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
			}
		});
		// Visible.GONE
		bt_other16.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
			}
		});
		// Visible.GONE
		bt_other17.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
			}
		});
		// Visible.GONE
		bt_other18.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
			}
		});
		// 닫기버튼
		bt_orher_Close.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Button bt_other_add = (Button) findViewById(R.id.bt_other_add);
				Button bt_other6 = (Button) findViewById(R.id.bt_other6); // 대구
				LinearLayout other_visble = (LinearLayout) findViewById(R.id.other_visble);
				bt_other_add.setVisibility(View.VISIBLE);
				bt_other6.setVisibility(View.GONE);
				other_visble.setVisibility(View.GONE);
			}
		});
		// 자유게시판
		bt_freeboard.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				menuLeftSlideAnimationToggle(0);
				GetTotalData();

			}
		});
		// 공고등록
		bt_companyenrollment.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				menuLeftSlideAnimationToggle(0);

				Handler mHandler = new Handler(Looper.getMainLooper());
				mHandler.postDelayed(new Runnable() {
					@Override
					public void run() {
						Intent register_recruit = new Intent(mContext,
								Product_Information.class);
						register_recruit
								.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
						mContext.startActivity(register_recruit);
					}
				}, 1000);

			}
		});
		// 공고등록
		bt_companyenrollment2.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				menuLeftSlideAnimationToggle(0);

				Handler mHandler = new Handler(Looper.getMainLooper());
				mHandler.postDelayed(new Runnable() {
					@Override
					public void run() {
						Intent register_recruit = new Intent(mContext,
								Product_Information.class);
						register_recruit
								.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
						mContext.startActivity(register_recruit);
					}
				}, 1000);

			}
		});
		// 기업정보
		bt_companyinfo.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent company_INFOIntent = new Intent(mContext,
						CompanyService_3InfoActivity.class);
				company_INFOIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
				company_INFOIntent.putExtra("cnt", cnt + "");
				mContext.startActivity(company_INFOIntent);
			}
		});
		// 공고관리
		bt_management.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
			}
		});
		// 게재중
		bt_showing.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				SharedPreferences mPref = PreferenceManager
						.getDefaultSharedPreferences(mContext);
				SharedPreferences.Editor editor = mPref.edit();
				editor.putString("company_num", "1");
				editor.commit();
				Intent company_adminIntent = new Intent(mContext,
						CompanyService_1AdminActivity.class);
				company_adminIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
				company_adminIntent.putExtra("cnt", cnt + "");
				mContext.startActivity(company_adminIntent);
			}
		});
		// 게재종료
		bt_showend.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				SharedPreferences mPref = PreferenceManager
						.getDefaultSharedPreferences(mContext);
				SharedPreferences.Editor editor = mPref.edit();
				editor.putString("company_num", "2");
				editor.commit();
				Intent company_managementIntent = new Intent(mContext,
						CompanyService_1AdminActivity.class);
				company_managementIntent
						.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
				company_managementIntent.putExtra("cnt", cnt + "");
				mContext.startActivity(company_managementIntent);
			}
		});
		// 게재대기
		bt_showpost.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				SharedPreferences mPref = PreferenceManager
						.getDefaultSharedPreferences(mContext);
				SharedPreferences.Editor editor = mPref.edit();
				editor.putString("company_num", "3");
				editor.commit();
				Intent company_InfoIntent = new Intent(mContext,
						CompanyService_1AdminActivity.class);
				company_InfoIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
				company_InfoIntent.putExtra("cnt", cnt + "");
				mContext.startActivity(company_InfoIntent);
			}
		});
		// 게재보류
		bt_hold.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				SharedPreferences mPref = PreferenceManager
						.getDefaultSharedPreferences(mContext);
				SharedPreferences.Editor editor = mPref.edit();
				editor.putString("company_num", "4");
				editor.commit();
				Intent company_ReadingIntent = new Intent(mContext,
						CompanyService_1AdminActivity.class);
				company_ReadingIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
				company_ReadingIntent.putExtra("cnt", cnt + "");
				mContext.startActivity(company_ReadingIntent);
			}
		});
		// 지원자관리
		bt_volunteer.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
			}
		});
		// 전체 지원자
		bt_allvolunteer.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				SharedPreferences mPref = PreferenceManager
						.getDefaultSharedPreferences(mContext);
				SharedPreferences.Editor editor = mPref.edit();
				editor.putString("company_num2", "0");
				editor.commit();
				Intent company_MANAGEMENTIntent = new Intent(mContext,
						CompanyService_2ManagementActivity.class);
				company_MANAGEMENTIntent
						.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
				company_MANAGEMENTIntent.putExtra("cnt", cnt + "");
				mContext.startActivity(company_MANAGEMENTIntent);
			}
		});
		// 공고별 지원자
		bt_announcement_allvolunteer.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				SharedPreferences mPref = PreferenceManager
						.getDefaultSharedPreferences(mContext);
				SharedPreferences.Editor editor = mPref.edit();
				editor.putString("company_num2", "1");
				editor.commit();
				Intent company_MANAGEMENTIntent2 = new Intent(mContext,
						CompanyService_2ManagementActivity.class);
				company_MANAGEMENTIntent2
						.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
				company_MANAGEMENTIntent2.putExtra("cnt", cnt + "");
				mContext.startActivity(company_MANAGEMENTIntent2);
			}
		});
		// 이력서열람
		// bt_resumes.setOnClickListener(new OnClickListener() {
		// @Override
		// public void onClick(View v) {
		// // TODO Auto-generated method stub
		// Intent company_READINGIntent = new Intent(mContext,
		// CompanyService_4ReadingActivity.class);
		// company_READINGIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
		// company_READINGIntent.putExtra("cnt", cnt + "");
		// mContext.startActivity(company_READINGIntent);
		// }
		// });
		// 인재스크랩
		bt_scrap.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent company_HumanIntent = new Intent(mContext,
						CompanyService_5HumanActivity.class);
				company_HumanIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
				company_HumanIntent.putExtra("cnt", cnt + "");
				mContext.startActivity(company_HumanIntent);
			}
		});
		// 쪽지함
		bt_message.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				menuLeftSlideAnimationToggle(0);

				Handler mHandler = new Handler(Looper.getMainLooper());
				mHandler.postDelayed(new Runnable() {
					@Override
					public void run() {
						Intent message_Intent = new Intent(mContext,
								MessageList_Company.class);
						message_Intent
								.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
						mContext.startActivity(message_Intent);
					}
				}, 1000);
			}
		});
		// 쪽지함
		bt_message01.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				menuLeftSlideAnimationToggle(0);

				Handler mHandler = new Handler(Looper.getMainLooper());
				mHandler.postDelayed(new Runnable() {
					@Override
					public void run() {
						Intent message_Intent = new Intent(mContext,
								MessageList_Person.class);
						message_Intent
								.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
						mContext.startActivity(message_Intent);
					}
				}, 1000);
			}
		});
		// 상품안내
		bt_product.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				menuLeftSlideAnimationToggle(0);

				Handler mHandler = new Handler(Looper.getMainLooper());
				mHandler.postDelayed(new Runnable() {
					@Override
					public void run() {
						Intent Product_Information = new Intent(mContext,
								Product_Information.class);
						Product_Information
								.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
						mContext.startActivity(Product_Information);
					}
				}, 1000);

			}
		});

		button.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub

				if (isLeftExpanded) {
					menuLeftSlideAnimationToggle(0);

				} else {
					menuLeftSlideAnimationToggle(-1);

				}

			}
		});

	}

	public void setRightSlidingButton(Button button) {

		mRightButton = button;

		button.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub

				if (isRightExpanded) {
					menuRightSlideAnimationToggle(0);

				} else {
					menuRightSlideAnimationToggle(1);

				}

			}
		});

	}

	// 로그인
	public void PostLoginTask(String id, String password) {
		ProcessPostLoginTask task = new ProcessPostLoginTask();
		task.execute(id, password);
	}

	private class ProcessPostLoginTask extends AsyncTask<String, Void, Boolean> {
		@Override
		protected Boolean doInBackground(String... loginData) {
			String id = loginData[0];
			String pw = loginData[1];

			try {

				ArrayList<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>();
				nameValuePairs.add(new BasicNameValuePair("mobile", "android"));
				nameValuePairs.add(new BasicNameValuePair("id", id));
				nameValuePairs.add(new BasicNameValuePair("pw", pw));

				HttpParams params = client.getParams();
				HttpConnectionParams.setConnectionTimeout(params, 5000);
				HttpConnectionParams.setSoTimeout(params, 5000);

				HttpPost httpPost = new HttpPost(Const.API_LOGIN);
				UrlEncodedFormEntity entityRequest = new UrlEncodedFormEntity(
						nameValuePairs, "UTF-8");

				httpPost.setEntity(entityRequest);

				HttpResponse responsePOST = client.execute(httpPost);

				HttpEntity resEntity = responsePOST.getEntity();
				String xml = EntityUtils.toString(resEntity);

				if (xml != null && xml.length() > 0) {
					if (xml.equals("yes")) {
						try {
							ArrayList<NameValuePair> nameValuePairs2 = new ArrayList<NameValuePair>();
							nameValuePairs2.add(new BasicNameValuePair(
									"mobile", "android"));

							HttpParams params2 = client.getParams();
							HttpConnectionParams.setConnectionTimeout(params2,
									5000);
							HttpConnectionParams.setSoTimeout(params2, 5000);

							HttpPost httpPost2 = new HttpPost(
									Const.API_LOGIN_CHECK);
							UrlEncodedFormEntity entityRequest2 = new UrlEncodedFormEntity(
									nameValuePairs2, "UTF-8");

							httpPost2.setEntity(entityRequest2);

							HttpResponse responsePOST2 = client
									.execute(httpPost2);

							HttpEntity resEntity2 = responsePOST2.getEntity();
							String xml2 = EntityUtils.toString(resEntity2);

							try {
								JSONArray ja = new JSONArray(xml2);
								JSONObject order = ja.getJSONObject(0);

								String mType = order.getString("login_type")
										.toString();
								String mName = order.getString("login_name")
										.toString();

								uPref.put("login_type", mType);
								uPref.put("login_name", mName);
							} catch (Exception e) {
								e.printStackTrace();
							}

							cookies = ((DefaultHttpClient) client)
									.getCookieStore().getCookies();

							if (!cookies.isEmpty()) {
								return true;
							} else {
								return false;
							}
						} catch (UnknownHostException e) {
							e.printStackTrace();
							return false;
						} catch (UnsupportedEncodingException e) {
							e.printStackTrace();
							return false;
						} catch (IllegalStateException e) {
							e.printStackTrace();
							return false;
						} catch (SocketException e) {
							e.printStackTrace();
							return false;
						} catch (SocketTimeoutException e) {
							e.printStackTrace();
							return false;
						} catch (IOException e) {
							e.printStackTrace();
							return false;
						}
					} else if (xml.equals("no")) { // 로그인 실패
						return false;
					} else { // 예외처리 (리턴값이 yes / no 둘다 아닌경우)
						Log.e(Const.LOGCAT, "Exception return value : "
								+ result);
						return false;
					}
				}
			} catch (UnknownHostException e) {
				e.printStackTrace();
				return false;
			} catch (UnsupportedEncodingException e) {
				e.printStackTrace();
				return false;
			} catch (IllegalStateException e) {
				e.printStackTrace();
				return false;
			} catch (SocketException e) {
				e.printStackTrace();
				return false;
			} catch (SocketTimeoutException e) {
				e.printStackTrace();
				return false;
			} catch (IOException e) {
				e.printStackTrace();
				return false;
			}
			return false;
		}

		@Override
		protected void onPostExecute(Boolean result) {
			super.onPostExecute(result);
			if (result == false) {
				Log.e(Const.LOGCAT, "Login Fail");
				Log.e(Const.LOGCAT, "Return val : " + result);

				Toast.makeText(mContext,
						"등록되지 않은 아이디이거나, 아이디 또는 비밀번호를 잘못 입력하셨습니다.",
						Toast.LENGTH_SHORT).show();
			} else if (result == true) {
				Toast.makeText(mContext, "로그인 성공", Toast.LENGTH_SHORT).show();
				String[] arrCookieName = new String[4];
				arrCookieName[0] = cookies.get(1).getName(); // name
				arrCookieName[1] = cookies.get(1).getValue(); // value

				arrCookieName[2] = cookies.get(2).getName(); // name
				arrCookieName[3] = cookies.get(2).getValue(); // value

				uPref.put("s_key", arrCookieName[1]);
				uPref.put("s_id", arrCookieName[3]);
				if (chk_login_status.isChecked()) {
					Log.e(Const.LOGCAT, "check");
					uPref.put("login_num", "2");
					uPref.put("id", login_id);
					uPref.put("pw", login_pw);
				} else {
					Log.e(Const.LOGCAT, "uncheck");
					uPref.put("login_num", "1");
				}

				// Log.e(Const.LOGCAT, "Cookie Data (1) : name : "+
				// arrCookieName[0] + "\nvalue : " + arrCookieName[1]);
				// Log.e(Const.LOGCAT, "Cookie Data (2) : name : "+
				// arrCookieName[2] + "\nvalue : " + arrCookieName[3]);

				sectionPopupMenuDialog.dismiss();

				String loginType, loginNum;
				loginType = uPref.getValue("login_type", null);
				loginNum = uPref.getValue("login_num", null);

				if ((loginType.equals("3") && loginNum.equals("1"))
						|| (loginType.equals("3") && loginNum.equals("2"))) { // 기업로그인
					Button bt_info = (Button) findViewById(R.id.bt_info);
					Button bt_join = (Button) findViewById(R.id.bt_join);
					Button bt_Curriculum = (Button) findViewById(R.id.bt_Curriculum);
					Button bt_Profile = (Button) findViewById(R.id.bt_login);
					Button bt_companyenrollment = (Button) findViewById(R.id.bt_companyenrollment);
					Button bt_companyenrollment2 = (Button) findViewById(R.id.bt_companyenrollment2);
					Button bt_companyinfo = (Button) findViewById(R.id.bt_companyinfo);
					Button bt_logout = (Button) findViewById(R.id.bt_logout);
					Button bt_logout2 = (Button) findViewById(R.id.bt_logout2);
					LinearLayout alone_visble = (LinearLayout) findViewById(R.id.alone_visble);
					LinearLayout company_visble = (LinearLayout) findViewById(R.id.company_visble);
					alone_visble.setVisibility(View.GONE);
					bt_Curriculum.setVisibility(View.GONE);
					bt_Profile.setVisibility(View.GONE);
					bt_join.setVisibility(View.GONE);
					bt_info.setVisibility(View.GONE);

					bt_companyinfo.setVisibility(View.VISIBLE);
					bt_companyenrollment.setVisibility(View.GONE);// *1*
					bt_companyenrollment2.setVisibility(View.VISIBLE);
					bt_logout.setVisibility(View.GONE);
					bt_logout2.setVisibility(View.VISIBLE);
					company_visble.setVisibility(View.VISIBLE);
				} else if ((loginType.equals("4") && loginNum.equals("1"))
						|| (loginType.equals("4") && loginNum.equals("2"))) { // 개인로그인
					Button bt_support = (Button) findViewById(R.id.bt_support);
					Button bt_info = (Button) findViewById(R.id.bt_info);
					Button bt_logout = (Button) findViewById(R.id.bt_logout);
					Button bt_logout2 = (Button) findViewById(R.id.bt_logout2);
					Button bt_login = (Button) findViewById(R.id.bt_login);
					Button bt_join = (Button) findViewById(R.id.bt_join);
					Button bt_companyenrollment = (Button) findViewById(R.id.bt_companyenrollment);
					Button bt_companyenrollment2 = (Button) findViewById(R.id.bt_companyenrollment2);
					LinearLayout alone_visble = (LinearLayout) findViewById(R.id.alone_visble);
					LinearLayout company_visble = (LinearLayout) findViewById(R.id.company_visble);
					alone_visble.setVisibility(View.VISIBLE);
					company_visble.setVisibility(View.GONE);

					LinearLayout linear_message = (LinearLayout) findViewById(R.id.linear_message);
					linear_message.setVisibility(View.VISIBLE);

					bt_logout.setVisibility(View.VISIBLE);
					bt_logout2.setVisibility(View.GONE);
					bt_support.setVisibility(View.VISIBLE);
					bt_info.setVisibility(View.VISIBLE);
					bt_companyenrollment.setVisibility(View.GONE);
					bt_companyenrollment2.setVisibility(View.GONE);
					bt_login.setVisibility(View.GONE);
					bt_join.setVisibility(View.GONE);
				}

				UtilPreference uPref = new UtilPreference(mContext);
				String mRegid = uPref.getValue("regid", "0");

				SetRegIdData(mRegid);
			} else {
				Log.e(Const.LOGCAT, "Login Exception");
				Log.e(Const.LOGCAT, "Return val : " + result);

				sectionPopupMenuDialog.dismiss();
				Toast.makeText(mContext, "로그인 실패 (Exception)",
						Toast.LENGTH_SHORT).show();
			}
		}
	}

	public void SetRegIdData(final String mRegId) {
		ProcessSetRegIdDataTask task = new ProcessSetRegIdDataTask();
		task.execute(mRegId);
	}

	private class ProcessSetRegIdDataTask extends AsyncTask<String, Void, Void> {
		@Override
		protected Void doInBackground(String... appTagName) {
			String mRegId = appTagName[0];
			try {
				ArrayList<NameValuePair> nameValuePairs2 = new ArrayList<NameValuePair>();
				nameValuePairs2.add(new BasicNameValuePair("reg_code", mRegId));

				HttpParams params2 = client.getParams();
				HttpConnectionParams.setConnectionTimeout(params2, 5000);
				HttpConnectionParams.setSoTimeout(params2, 5000);

				HttpPost httpPost2 = new HttpPost(Const.GCM_REGID);
				UrlEncodedFormEntity entityRequest2 = new UrlEncodedFormEntity(
						nameValuePairs2, "UTF-8");

				httpPost2.setEntity(entityRequest2);

				HttpResponse responsePOST2 = client.execute(httpPost2);

				HttpEntity resEntity2 = responsePOST2.getEntity();
				String xml2 = EntityUtils.toString(resEntity2);

			} catch (Exception e) {
				e.printStackTrace();
			}
			return null;
		}

		@Override
		protected void onPostExecute(Void result) {
			super.onPostExecute(result);
		}
	}

	// 로그인 정보 받아오기
	public void PostLoginInfoTask() {
		ProcessPostLoginInfoTask task = new ProcessPostLoginInfoTask();
		task.execute();
	}

	private class ProcessPostLoginInfoTask extends
			AsyncTask<Void, Void, Boolean> {
		@Override
		protected Boolean doInBackground(Void... loginData) {
			try {
				ArrayList<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>();
				nameValuePairs.add(new BasicNameValuePair("mobile", "android"));

				HttpParams params = client.getParams();
				HttpConnectionParams.setConnectionTimeout(params, 5000);
				HttpConnectionParams.setSoTimeout(params, 5000);

				HttpPost httpPost = new HttpPost(Const.API_LOGIN_CHECK);
				UrlEncodedFormEntity entityRequest = new UrlEncodedFormEntity(
						nameValuePairs, "EUC-KR");

				httpPost.setEntity(entityRequest);

				HttpResponse responsePost = client.execute(httpPost);
				HttpEntity resEntity = responsePost.getEntity();

				String xml = EntityUtils.toString(resEntity);

				if (xml.length() > 0) {
					JSONObject jObj = null;
					JSONArray jArr = null;

					try {
						jArr = new JSONArray(xml);
						jObj = jArr.getJSONObject(0);
						// 현재 접속한 사용자의 권한
						// 0:비회원
						// 1:아이크로스
						// 2:교차로
						// 3:기업회원
						// 4:개인회원
						Log.e(Const.LOGCAT,
								"obj " + jObj.getString("login_type"));

						Log.e(Const.LOGCAT,
								"obj " + jObj.getString("login_name")); // 현재
																		// 접속한
																		// 사용자의
																		// 이름
						return true;
					} catch (JSONException e) {
						Log.e(Const.LOGCAT, "Parse Error : " + xml);
						return false;
					}
				} else {
					return false;
				}
			} catch (Exception e) {
				e.printStackTrace();
			}
			return false;
		}

		@Override
		protected void onPostExecute(Boolean result) {
			super.onPostExecute(result);
			if (result == false) { // data not parsed
				Toast.makeText(mContext, "정보 Get 실패", Toast.LENGTH_SHORT)
						.show();
			} else if (result == true) { // 성공

			} else {
				Toast.makeText(mContext, "예외적 실패", Toast.LENGTH_SHORT).show();
			}
		}
	}

	public void PostLogoutTask() {
		ProcessPostLogoutTask task = new ProcessPostLogoutTask();
		task.execute();
	}

	private class ProcessPostLogoutTask extends AsyncTask<Void, Void, Boolean> {
		@Override
		protected Boolean doInBackground(Void... loginData) {
			try {
				URL url = new URL(Const.API_LOGOUT); // URL

				HttpURLConnection http = (HttpURLConnection) url
						.openConnection(); // 접속
				// --------------------------
				// 전송 모드 설정 - 기본적인 설정이다
				// --------------------------
				http.setConnectTimeout(5000);
				http.setReadTimeout(5000);

				http.setDefaultUseCaches(false);
				http.setDoInput(true); // 서버에서 읽기 모드 지정
				http.setDoOutput(true); // 서버로 쓰기 모드 지정
				http.setRequestMethod("POST"); // 전송 방식은 POST
				// 서버에게 웹에서 <Form>으로 값이 넘어온 것과 같은 방식으로 처리하라는 걸 알려준다
				http.setRequestProperty("content-type",
						"application/x-www-form-urlencoded");
				// --------------------------
				// 서버로 값 전송
				// --------------------------
				StringBuffer buffer = new StringBuffer();

				OutputStreamWriter outStream = new OutputStreamWriter(
						http.getOutputStream(), "UTF-8");
				PrintWriter writer = new PrintWriter(outStream);
				writer.write(buffer.toString());
				writer.flush();
				// --------------------------
				// 서버에서 전송받기
				// --------------------------
				InputStreamReader tmp = new InputStreamReader(
						http.getInputStream(), "UTF-8");
				BufferedReader reader = new BufferedReader(tmp);
				StringBuilder builder = new StringBuilder();
				String str;
				while ((str = reader.readLine()) != null) {
					builder.append(str + "\n");
				}
				result = builder.toString();
				result = result.trim();

				if (result != null && result.length() > 0) {
					if (result.equals("yes")) { // 로그아웃 성공
						Log.e(Const.LOGCAT, "Success return value : " + result);
						return true;
					} else if (result.equals("no")) { // 로그아웃 실패
						Log.e(Const.LOGCAT, "fail return value : " + result);
						return false;
					} else { // 예외처리 (리턴값이 yes / no 둘다 아닌경우)
						Log.e(Const.LOGCAT, "Exception return value : "
								+ result);
						return false;
					}
				}
			} catch (UnknownHostException e) {
				e.printStackTrace();
				return false;
			} catch (UnsupportedEncodingException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
				return false;
			} catch (IllegalStateException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
				return false;
			} catch (SocketException e) {
				e.printStackTrace();
				return false;
			} catch (SocketTimeoutException e) {
				e.printStackTrace();
				return false;
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
				return false;
			}
			return false;
		}

		@Override
		protected void onPostExecute(Boolean result) {
			super.onPostExecute(result);
			if (result == false) { // data not parsed
				Toast.makeText(mContext, "로그아웃 실패", Toast.LENGTH_SHORT).show();
			} else if (result == true) {
				uPref = new UtilPreference(mContext);
				uPref.put("s_key", "");
				uPref.put("s_id", "");
				uPref.put("login_num", "0");
				uPref.put("login_type", "99");
				uPref.put("login_name", "로그아웃");

				Button bt_login = (Button) findViewById(R.id.bt_login);
				Button bt_join = (Button) findViewById(R.id.bt_join);
				Button bt_companyenrollment = (Button) findViewById(R.id.bt_companyenrollment);
				Button bt_companyenrollment2 = (Button) findViewById(R.id.bt_companyenrollment2);
				Button bt_logout = (Button) findViewById(R.id.bt_logout);
				Button bt_logout2 = (Button) findViewById(R.id.bt_logout2);
				Button bt_support = (Button) findViewById(R.id.bt_support);
				Button bt_info = (Button) findViewById(R.id.bt_info);
				Button bt_topmenu = (Button) findViewById(R.id.bt_topmenu);
				Button bt_topmenu1 = (Button) findViewById(R.id.bt_topmenu1);
				Button bt_topmenu2 = (Button) findViewById(R.id.bt_topmenu2);
				Button bt_careers = (Button) findViewById(R.id.bt_careers);
				Button bt_Curriculum = (Button) findViewById(R.id.bt_Curriculum);
				Button bt_companyinfo = (Button) findViewById(R.id.bt_companyinfo);
				LinearLayout alone_visble = (LinearLayout) findViewById(R.id.alone_visble);
				LinearLayout company_visble = (LinearLayout) findViewById(R.id.company_visble);
				alone_visble.setVisibility(View.VISIBLE);
				company_visble.setVisibility(View.GONE);

				bt_logout.setVisibility(View.GONE);
				bt_logout2.setVisibility(View.GONE);
				bt_support.setVisibility(View.GONE);
				bt_info.setVisibility(View.GONE);
				bt_companyinfo.setVisibility(View.GONE);
				bt_login.setVisibility(View.VISIBLE);
				bt_join.setVisibility(View.VISIBLE);
				bt_Curriculum.setVisibility(View.VISIBLE);
				bt_companyenrollment.setVisibility(View.VISIBLE);// *1*
				bt_companyenrollment2.setVisibility(View.GONE);

				LinearLayout linear_message = (LinearLayout) findViewById(R.id.linear_message);
				linear_message.setVisibility(View.GONE);

				Log.e(Const.LOGCAT,
						"uPref : " + uPref.getValue("login_type", null));
				
				Intent mainIntent = new Intent(mContext,
						MainActivity.class);
				mainIntent
						.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
				Toast.makeText(mContext, "로그아웃 성공", 2000)
						.show();
				mContext.startActivity(mainIntent);
			} else {
				Toast.makeText(mContext, "예외적 실패", Toast.LENGTH_SHORT).show();
			}
		}
	}

	void menuLeftSlideAnimationToggle(float weight) {

		if (!isLeftExpanded) {
			// networkRequestTimeLineGetNewCnt();
			mAlphaLayout.setVisibility(View.VISIBLE);
			mAlphaLayout.bringToFront();
			mAlphaLayout.invalidate();
			Animation animation = AnimationUtils.loadAnimation(this,
					R.anim.alpha2);
			//
			mAlphaLayout.startAnimation(animation);

			isLeftExpanded = true;
			rightMenuPanel.setVisibility(View.GONE);
			leftMenuPanel.setVisibility(View.VISIBLE);

			Log.e("", "weight : " + weight);

			// Expand
			new ExpandAnimation(leftMenuPanel, leftPanelWidth, "left",
					Animation.RELATIVE_TO_SELF, weight,
					Animation.RELATIVE_TO_SELF, 0.0f, 0, 0.0f, 0, 0.0f);

			mLeftButton.setEnabled(false);

			leftMenuPanelEmpty.setEnabled(true);
			leftMenuPanelEmpty.setOnTouchListener(new OnTouchListener() {

				@Override
				public boolean onTouch(View arg0, MotionEvent arg1) {
					menuLeftSlideAnimationToggle(0);
					return true;
				}
			});

		} else {
			mAlphaLayout.setVisibility(View.GONE);
			Animation animation = AnimationUtils.loadAnimation(this,
					R.anim.alpha);
			//
			mAlphaLayout.startAnimation(animation);
			mAlphaLayout.bringToFront();
			mAlphaLayout.invalidate();
			isLeftExpanded = false;

			// Collapse
			new CloseAnimation(leftMenuPanel, leftPanelWidth,
					TranslateAnimation.RELATIVE_TO_SELF, weight,
					TranslateAnimation.RELATIVE_TO_SELF, -1.0f, 0, 0.0f, 0,
					0.0f);

			mLeftButton.setEnabled(true);
			leftMenuPanelEmpty.setEnabled(false);

		}

	}

	public void menuRightSlideAnimationToggle(float weight) {

		Log.e("", "weight : " + weight);

		if (!isRightExpanded) {
			isRightExpanded = true;
			rightMenuPanel.setVisibility(View.VISIBLE);
			leftMenuPanel.setVisibility(View.GONE);

			// Expand
			new ExpandAnimation(rightMenuPanel, rightPanelWidth, "right",
					Animation.RELATIVE_TO_SELF, weight,
					Animation.RELATIVE_TO_SELF, 0.0f, 0, 0.0f, 0, 0.0f);

			mRightButton.setEnabled(false);

			rightMenuPanelEmpty.setEnabled(true);
			rightMenuPanelEmpty.setOnTouchListener(new OnTouchListener() {

				@Override
				public boolean onTouch(View arg0, MotionEvent arg1) {
					menuRightSlideAnimationToggle(0);
					return true;
				}
			});

		} else {
			isRightExpanded = false;

			// Collapse
			new CloseAnimation(rightMenuPanel, rightPanelWidth,
					TranslateAnimation.RELATIVE_TO_SELF, weight,
					TranslateAnimation.RELATIVE_TO_SELF, 1.0f, 0, 0.0f, 0, 0.0f);

			mRightButton.setEnabled(true);
			rightMenuPanelEmpty.setEnabled(false);
		}
	}

	public static void enableDisableViewGroup(ViewGroup viewGroup,
			boolean enabled) {
		int childCount = viewGroup.getChildCount();
		for (int i = 0; i < childCount; i++) {
			View view = viewGroup.getChildAt(i);

			if (view.getId() != R.id.bt_left) {
				view.setEnabled(enabled);
				if (view instanceof ViewGroup) {
					enableDisableViewGroup((ViewGroup) view, enabled);
				}
			}
		}
	}

	/**
	 * 화면 구성
	 * 
	 * @param res
	 */
	@Override
	public void setContentView(int res) {

		mContentView.removeAllViews();

		LayoutInflater inflater;
		inflater = LayoutInflater.from(this);

		View item = inflater.inflate(res, null);
		// item.setBackgroundResource(R.drawable.btn_board_more);
		mContentView.addView(item, new LinearLayout.LayoutParams(
				LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));

	}

	public void setLeftView(int res) {

		leftMenuPanelSub.removeAllViews();

		LayoutInflater inflater;
		inflater = LayoutInflater.from(this);

		View item = inflater.inflate(res, null);
		leftMenuPanelSub.addView(item, new LinearLayout.LayoutParams(
				LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));

	}

	public void setLeftView_(int res) {

		LayoutInflater inflater;
		inflater = LayoutInflater.from(this);

		View item = inflater.inflate(res, null);
		leftMenuPanelSub.addView(item, new LinearLayout.LayoutParams(
				LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));

	}

	public void setRightView(int res) {
		rightMenuPanelSub.removeAllViews();

		LayoutInflater inflater;
		inflater = LayoutInflater.from(this);

		View item = inflater.inflate(res, null);
		rightMenuPanelSub.addView(item, new LinearLayout.LayoutParams(
				LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
	}

	/**
	 * 백키 이벤트 홈키 이벤트 등록
	 * 
	 * @param activity
	 *            , mainClass
	 */
	@SuppressWarnings("rawtypes")
	public void setTitleEvent(final Activity activity, final Class mainClass) {

		mBackButton.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				((Activity) activity).finish();
			}
		});

		mHomeButton.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				Intent homeIntent = new Intent(activity, mainClass);
				homeIntent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP
						| Intent.FLAG_ACTIVITY_CLEAR_TOP
						| Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
				((Activity) activity).startActivity(homeIntent);
			}
		});

	}

	public void setTitle(String title) {

		mTitleTextView.setText(title);

	}

	public void setTitleTextView(TextView textView) {

		mTitleTextView = textView;

		mTitleTextView.invalidate();

	}

	public void setVisibleBackButton(int visibility) {

		mBackButton.setVisibility(visibility);

	}

	public void setBackButton(Button button) {

		mBackButton = button;

		mBackButton.invalidate();

	}

	public void setVisibleHomeButton(int visibility) {

		mHomeButton.setVisibility(visibility);

	}

	public void setHomeButton(Button button) {

		mHomeButton = button;

		mHomeButton.invalidate();

	}

	public void setVisibleTitleView(int visibility) {

		mTitleLayout.setVisibility(visibility);

	}

	public void setTitleBackgroundResource(int res) {

		mTitleLayout.setBackgroundResource(res);

	}

	public void setTitleBackgroundDrawable(Drawable drawable) {

		mTitleLayout.setBackgroundDrawable(drawable);

	}

	public void setTitleBackgroundColor(int color) {

		mTitleLayout.setBackgroundColor(color);

	}

	public void setHeightTitleView(float weight) {

		LinearLayout.LayoutParams titleViewParams = new LinearLayout.LayoutParams(
				android.view.ViewGroup.LayoutParams.MATCH_PARENT, 0, weight);
		mTitleLayout.setLayoutParams(titleViewParams);

		LinearLayout.LayoutParams contentViewParams = new LinearLayout.LayoutParams(
				android.view.ViewGroup.LayoutParams.MATCH_PARENT, 0, 1 - weight);
		mContentView.setLayoutParams(contentViewParams);

	}

	public void setGlobalFont(View view, Typeface typeface) {
		if (view != null) {
			if (view instanceof ViewGroup) {
				ViewGroup vg = (ViewGroup) view;
				int vgCnt = vg.getChildCount();
				for (int i = 0; i < vgCnt; i++) {
					View v = vg.getChildAt(i);
					if (v instanceof TextView) {
						((TextView) v).setTypeface(typeface);
					}
					setGlobalFont(v, typeface);
				}
			}
		}
	}

	// 게시판페이지데이터 받기
	public void GetTotalData() {

		jsondata1 = "mode";
		jsondata2 = "=";
		jsondata3 = "total";
		TotalTask task1 = new TotalTask();
		task1.execute();

	}

	// 게시판토탈데이터용 JSON 데이터
	private class TotalTask extends AsyncTask<Void, Void, Boolean> {
		@Override
		protected Boolean doInBackground(Void... params) {

			try {
				StringBuffer buffer = new StringBuffer();
				buffer.append(jsondata1).append(jsondata2).append(jsondata3);
				jsondata = new JsonData(Const.BOARD_LIST, buffer, mContext,
						"POST");

				if (jsondata.jAr != null) {
					if (jsondata.jAr.length() == 0) {

					} else {
						for (int i = 0; i < jsondata.jAr.length(); i++) {
							jsondata.jObj = jsondata.jAr.getJSONObject(i);
							if (jsondata1 == "mode") {
								cnt = jsondata.jObj.getString("cnt");
								// setTotal();
							}
						}

					}
				} else {
					return false;
				}
				return true;
			} catch (Exception e) {
				e.printStackTrace();
			}
			return false;

		}

		@Override
		protected void onPostExecute(Boolean result) {
			super.onPostExecute(result);
			if (result == false) {
				// data not parsed
			} else {
				// Toast.makeText(BaseActivity.this, "자유게시판" + cnt,
				// Toast.LENGTH_SHORT).show();
				Handler mHandler = new Handler(Looper.getMainLooper());
				mHandler.postDelayed(new Runnable() {
					@Override
					public void run() {

						Intent Base_Board_ListIntent = new Intent(mContext,
								Board_ListActivity.class);
						Base_Board_ListIntent
								.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
						Base_Board_ListIntent.putExtra("cnt", cnt + "");
						mContext.startActivity(Base_Board_ListIntent);
					}
				}, 500);

			}

		}
	}

}